import type { User, CodeType } from '@/types/user'
import { request } from '@/utils/request'

//密码登录
export const loginByPassword = (mobile: string, password: string) => {
  return request<User>('/login/password', 'POST', { mobile, password })
}
//获取短信验证码
export const sendMobileCode = (mobile: string, type: CodeType) => {
  return request<string>('/code', 'GET', { mobile, type })
}
